#1. 使用in来判定某个key是否在字典中存在
#使用not in来判定某个key是否在字典中存在

# student = {
#     'id': 1,
#     'name': 'zhangsan',
# }
# print('id' in student)
# print('score' in student)
# print('grade' not in student)
# print('score' not in student)
# print('zhangsan' in student)

#2.使用 [ ]来判定key获取到value
student = {
    'id': 1,
    'name': 'zhangsan',
    99:'forever'
}
print(student['id'])
print(student['name'])
print(student[99])
print(student['score'])

